/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 徐海涛
 * Date: 2022-01-06
 * Time: 15:10
 * 包装类
 */
public class TestDemo2 {
    public static void main3(String[] args) {
        Integer a = 128;
        Integer b = 128;
        System.out.println(a==b);
    }
    public static void main2(String[] args) {
        Integer a = 123;//装箱 装包
        int b = a;//拆箱 拆包[隐式的]
        System.out.println(a+ " " + b);

        System.out.println("====================");

        Integer a2 = Integer.valueOf(123);//显示的装包
        Integer a3 = new Integer(123);//显示的装包

        int b2 = a2.intValue();//显示的拆包
        double d = a2.doubleValue();//显示的拆包

        int i = 10;//显示的初始化

    }
    public static void main1(String[] args) {
        String a  = "123";//String 不是包装类
        int ret =Integer.valueOf(a);
        System.out.println(ret+1);
    }
}
